package com.iweb.day03;

/**
 * @author WuYongheng
 * @date 2021/10/19
 * @description
 */
public class TriangleDemo {
    public static void main(String[] args) {

        // 打印直角三角形
        System.out.println("正直角三角形");
        for (int i = 1; i < 6; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print("*"+" ");
            }
            System.out.println();
        }
        System.out.println("倒直角三角形");
        // 打印直角三角形(倒着打)
        for (int i = 5; i >0 ; i--) {
            for (int j = 1; j <= i; j++) {
                System.out.print("*"+" ");
            }
            System.out.println();
        }


    }
}
